{% extends './layout/default' %}

{% block breadcrumbs %}
    {{ Breadcrumbs.render(Route.getCurrentRoute.getName, start, end) }}
{% endblock %}

{% block content %}

    {# upper show-all instruction #}
    {% if periods|length > 0 %}
        <div class="row">
            <div class="col-lg-offset-10 col-lg-2 col-md-offset-9 col-md-3 col-sm-12 col-xs-12">
                <p class="small text-center"><a href="{{ route('categories.no-category.all') }}">{{ 'showEverything'|_ }}</a></p>
            </div>
        </div>
    {% endif %}

    <div class="row">
        <div class="{% if periods|length > 0 %}col-lg-10 col-md-9 col-sm-12 col-xs-12{% else %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% endif %}">
            <div class="box">
                <div class="box-header with-border">
                    <h3 class="box-title">{{ subTitle }}</h3>
                </div>
                <div class="box-body ">

                    {% if periods|length > 0 %}
                        {% include 'list.groups' %}
                        <p>
                            <span class="fa fa-calendar"></span>
                            <a href="{{ route('categories.no-category.all') }}">{{ 'show_all_no_filter'|_ }}</a>
                        </p>
                    {% else %}
                        {% include 'list.groups' %}
                        <p>
                            <span class="fa fa-calendar"></span>
                            <a href="{{ route('categories.no-category') }}">{{ 'show_the_current_period_and_overview'|_ }}</a>
                        </p>
                    {% endif %}
                </div>
            </div>
        </div>

        {% if periods|length > 0 %}
            <div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
                {% include 'list.periods' %}
            </div>
        {% endif %}

    </div>

    {# lower show-all instruction #}
    {% if periods|length > 0 %}
        <div class="row">
            <div class="col-lg-offset-10 col-lg-2 col-md-offset-9 col-md-3 col-sm-12 col-xs-12">
                <p class="small text-center"><a href="{{ route('categories.no-category',['all']) }}">{{ 'showEverything'|_ }}</a></p>
            </div>
        </div>
    {% endif %}

{% endblock %}
{% block scripts %}
    {# required for groups.twig #}
    <script type="text/javascript" src="v1/js/ff/list/groups.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}
